home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 19
/
Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso
/
Aminet
/
text
/
misc
/
nroff.lha
/
nroff
/
tests.uu
/
tests.shar.Z
/
tests.shar
/
nh.out
< prev
next >
Wrap
Text File
|
1997-01-24
|
3KB
|
199 lines
Test of NH Macro
Note that we do not need the TL, AU, AI, AB, AE macros to
use -ms, just paragraphs. We don't even need section
headings, though that helps. Besides, that is what we are
testing here!
1. MAJOR SECTION
This should be section 1. Always end the section title with
a paragraph of some sort. Here I use left block paragraph,
LP.
It is a major section, in this case. Note that I started
with ".NH 0" here (which resets the left-most level to "1"
but I could have also just started with ".NH 1" indicating
level "1" section. Also note that NH requires an argument,
even if it is just 1 (bug, I am afraid).
2. MAJOR SECTION
This should be section 2. Another major section.
2.1. Level 2 Section
This should be section 2.1. This was specified with ".NH 2"
indicating level 2 section.
2.2. Another Level 2 Section
This should be section 2.2. Also specified with ".NH 2"
indicating level 2 section.
2.3. Yet Another Level 2 Section
This should be section 2.3. Yes, this too was specified
with ".NH 2" indicating level 2 section.
3. BACK TO MAJOR SECTION
This should be section 3. It was specified with ".NH 1"
indicating back to most major section. Note that at each NH
macro, all higher level section numbers are reset to zero
and the current level is incremented.
22 July 1990
- 2 -
3.1. Level 2 Section
This should be section 3.1. It is a sub section, a
so-called level 2 section. The advantage of just keeping
track of the levels is that you can rapidly add new sections
to a text without changing the section numbers everywhere.
You just pick the correct level and pump in the text.
3.2. Another Level 2 Section
This should be section 3.2. It is also a sub section, a
so-called level 2 section.
3.2.1. Level 3 Section
This should be section 3.2.1. Now we go one level deeper in
section numbering. It was specified with ".NH 3" as you
would expect.
3.2.2. Another Level 3 Section
This should be section 3.2.2. Same level as last section,
but increase the count.
3.2.2.1. Level 4 Section
This should be section 3.2.2.1. Yet one more level; this is
level 4 (the number of numbers as well).
3.2.2.2. Another Level 4 Section
This should be section 3.2.2.2.
3.3. Back to Level 2 Section
This should be section 3.3. Note we can skip sections going
up, but it does not make sense to skip from level 2 to level
4 while going down, though I guess it is possible.
3.3.1. And Level 3 Section
This should be section 3.3.1. One more level down to level
3.
22 July 1990
- 3 -
4. MAJOR SECTION
This should be section 4. I am getting tired. It seems to
be working fine. I am glad i added the ".if" command to
nroff, which makes this all possible.
22 July 1990